import os, sys

path = r'C:\Users\Administrator\Desktop\1'
files = os.listdir(path)
# # 重命名
num = 4153
for file in files:
    old_dir = os.path.join(path, file)
    new_dir = os.path.join(path, f'{num}.jpg')
    os.rename(old_dir,new_dir)
    num +=1
# print ("重命名成功。")
# # 列出重命名后的目录
# print ("目录为: %s" %os.listdir(os.getcwd()))